

	#Title[ʏeP]
	#Text[ʏe]
	#Image[]
	#ScriptVersion[2]
	#BGM[.\BGM3.mp3]
	#Player[FREE]
	script_enemy_main
	{
		let movecount=0;
		let count=0;
		let count2=0;
		let angle=90;
		let angle5way=30;
		let cx=GetCenterX();
		let cy=GetCenterY();
		@Initialize
		{
			
			SetLife(2000);
			SetMovePosition02(cx,60,60);
			SetTimer(20);
			SetGraphicRect(1,1,48,48);
			LoadGraphic("script\img\2127578.png");
		}
			
		@MainLoop
		{
			
			


			if(count==60*2)
			{	
					loop(60){
						CreateShot01(GetX()-90,GetY()+30,2,angle,RED11,30);
						CreateShot01(GetX()+90,GetY()+30,2,angle,RED11,30);
						CreateShot01(GetX()-140,GetY()+100,2,angle,RED11,30);
						CreateShot01(GetX()+140,GetY()+100,2,angle,RED11,30);
					angle+=6;
						}
				
				count=0;
			}
			

			if(count2==60*4)
			{
				

				loop(5){
					CreateShot01(GetX(),GetY()+40,1,angle5way,BLUE03,30);
						angle5way+=30;
						count2=0;
					}
				angle5way=30;
			}
			
			if(movecount==60) 
		{
	    	if(GetX()<=GetPlayerX())//vC[GEɋꍇ
	    		{SetMovePosition02(GetX()+50,rand(50,100),60);}
	   	 else if(GetX()>GetPlayerX())//vC[G荶ɂꍇ
	    		{SetMovePosition02(GetX()-50,rand(50,100),60);}
	    		movecount = 0;
		}
				
				SetCollisionA(GetX(),GetY(),32);
				SetCollisionB(GetX(),GetY(),24);
				movecount++;
				count2++;
				count++;
				
		}

		@DrawLoop
		{
			
			SetTexture("script\img\2127578.png");
			DrawGraphic(GetX(),GetY()+40);
		}
		
		@Finalize
		{
			loop(24) {
        		let x = GetX + rand(-64, 64);
       	 		let y = GetY + rand(-64, 64);
        		CreateItem(ITEM_SCORE, x, y);
			}
			DeleteGraphic("script\img\2127578.png");
		}
	}
  
